﻿using System;

namespace CloudStorageProvider
{
    public class StorageProviderEventArgs : EventArgs
    {
        public StorageOperation Operation;
        public StorageOperationResult Result;
    }

    /// <summary>
    /// A common model for storage providers
    /// </summary>
    public interface IStorageProvider
    {
        // TODO: Change the URI parameters to strings; other provider types might not require them to be URIs.

        //Fields
        String FolderDelimiter { get; }

        // Events
        event EventHandler<StorageProviderEventArgs> StorageProviderOperationCompleted;

        // File handling
        void Put(ICloudFile o);
        void Delete(ICloudFile o);
        StorageOperationResult Rename(string originalPath, string newPath);
        void Overwrite(string originalPath, ICloudFile newObject);
        ICloudFile Get(string path, bool downloadObject);

        // Path and directory
        void CreateDirectory(string path);


        // Path methods
        bool CheckBlobExists(string path);
        CloudDirectoryCollection GetDirectoryListing(string path);
        CloudFileCollection GetFileListing(string path);
    }
}